# -*- coding: UTF-8 -*-
"""
@Project : FastTortoiseDemo
@File    : .py
@IDE     : PyCharm
@Author  : xuan
@Date    : 2023/12/29 13:45
"""
import os
# from pydantic_settings import BaseSettings
from motor.motor_asyncio import AsyncIOMotorClient

# 项目根目录
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# 日志目录
LOG_DIR = os.path.join(BASE_DIR, "Logs")

# mongodb 数据库配置
client = AsyncIOMotorClient("mongodb://localhost:27017")
mongodb = client["mitmdump"]
collection = mongodb["interface_1201"]


class Settings():
    """
    项目配置
    """
    app_name: str = "FastMoreApp"
    debug = True
    TORTOISE_ORM: str = "sqlite://./db/database.sqlite3"  # sqlite 数据库

    # TORTOISE_ORM = "mysql://root:!Qwe654321@10.249.29.11:3307/FastDemo?charset=utf8mb4"  # mysql 数据库

    class Config:
        env_file = ".env"


settings = Settings()
